<template>
  <div class="main">
    <div class="myInfoBox">
      <div class="iconAndName myInfoItem">
        <img class="marginRight20" src="../../assets/image/p1.png" alt="">
        <span class="marginRight20">微笑达人</span>
      </div>
      <div class="myInfoItem mySendOut">
        <div class="myRelease ">
          <img class="marginRight20" src="../../assets/image/p2.png" alt="">
          <span>我的发布</span>
          <p>{{detail.creatTime}}</p>
        </div>
        <div class="myFans">
          <img class="marginRight20" src="../../assets/image/p3.png" alt="">
          <span>我的粉丝</span>
          <p>{{detail.creatTime}}</p>
        </div>
        <div class="myFocus">
          <img  class="marginRight20" src="../../assets/image/p4.png" alt="">
          <span>我的关注</span>
          <p>{{detail.creatTime}}</p>
        </div>

      </div>
      <div class="myInfoItem" style="height:100%">
        <img class="starIcon" src="../../assets/image/p5.png" alt="">
      </div>

    </div>
    <div class='personal-container'>
      <nav class="nav">
        <ul class="nav-ul">
          <li :key="index" v-for="(item,index) in list">
            <router-link :to="item.path">{{item.title}}</router-link>
          </li>
        </ul>
      </nav>
      <main class="center">
        <router-view></router-view>
      </main>
    </div>
    
  </div>
</template>
<script>
import myFavourite from './components/favourite'
import myInfomation from './components/myInfomation'
import myCommen from './components/myCommen'
import myFocus from './components/myFocus'
export default {
  data() {
    return {
      show: false,
      list: [
        {
          title: "我的资料",
          path: "/loged/myInfomation"
        },
        {
          title: "我的粉丝",
          path: "/loged/myFans"
        },
        {
          title: "我的关注",
          path: "/loged/myFocus"
        },
        {
          title: "我的发布",
          path: "/loged/myRelease"
        },
        {
          title: "我的收藏",
          path: "/loged/myFavourite"
        },
        {
          title: "我的评论/回答",
          path: "/loged/myCommen"
        }
      ],
      detail:{
        creatTime:''
      }
    };
  },
  components: {
    myFavourite,
    myCommen,
    myInfomation,
    myFocus
  },
  created(){
    let data={
      param:{
        detail:{
          creatTime:this.detail.creatTime
        }
      }
    }
  }
};
</script>
<style lang="scss" scoped>
.main {
  // width: 1400px;
  // margin-left: 260px;
  width: 1260px;
  margin: auto;
  color: #222;
  .personal-container{
    display: flex
  }
  .myInfoBox{
    // width: 1400px;
    // margin: 0 15px;
    height: 180px;
    display: flex;
    align-items: center;
    border: 1px solid #DEDEDE;
    .myInfoItem{
      flex:1
    }
    .mySendOut{
      flex:3;
      display: flex
    }
    .iconAndName,.myRelease,.myFans,.myFocus{
      display: inline-block;
    }
    .myFocus{
      border-right: 0 !important
    }
    .iconAndName{
      vertical-align: top;
      img{
        margin-left: 40px;
        width: 38px;
        vertical-align: middle
      }
      span{
        font-size: 20px;
        font-weight: 600;
        vertical-align: middle
      }
    }
    .myRelease,.myFans,.myFocus{
      // padding-right: 40px;
      // margin-right: 40px;
      flex: 1;
      text-align: center;
      border-right: 1px dashed #DEDEDE;
      p{
        font-size: 30px;
        color: #fed226;
        font-weight: 700;
        margin-top: 15px;
      }
      span{
        font-size: 18px;
        vertical-align: middle
      }
      img{
        width: 22px;
        vertical-align: middle
      }
     
    }
    .marginRight20{
        margin-right: 20px;
        display: inline-block;
      }
      .starIcon{
        align-self: flex-start;
        margin-left: 150px;
        width: 28px
      }
  }   
  .nav {
    width: 170px;
    font-size: 14px;
    margin-top: 40px;
    display: inline-block;
    .nav-ul {
      li {
        height: 56px;
        line-height: 56px;
        text-align: center;
        font-weight: 800;
        a {
          color: #222;
          display: inline-block;
          width: 100%;
          height: 100%;
        }
        a.current{
          background: #fed226;
          color: #fff;
        }
        &:hover a {
          background: #fed226;
          color: #fff;
        }
      }
    }
  }
  .center {
    width: 1090px;
    min-height: 300px;
    display: inline-block;
    vertical-align: top;
    margin: 30px 0 0 25px;
    border: 1px solid #dedede
  }
}

</style>
